import {DataTypes, Model} from "sequelize";
import sequelize from "@/databases";

/**
 * 课程
 * 班级名称、班级简介、状态—启用、禁用
 */
class ClassModel extends Model {
}

ClassModel.init({
    id:{
        type: DataTypes.BIGINT,
        autoIncrement: true,
        primaryKey: true,
        allowNull: false,
        comment: "id"
    },
    name: DataTypes.STRING,//班级名称
    desc:DataTypes.STRING,//班级简介
    status:DataTypes.INTEGER,//状态，1-上架、0-下架
}, {sequelize, tableName: "classes"})
export default ClassModel